<include file="./Application/Home/View/default/public/header.html" title="我的订单"/>
<div id="teacher-form" class="teacher-form body-margin">
    <link rel="stylesheet" href="/Public/order/teacherorder/teacherorder.css">
    <div class="container">
        <if condition="$isMobile eq 1 ">
            <div class="m-head">
                <p class="left">我的订单</p>
                <div class="right dropdown">
                  <button class="btn btn-default dropdown-toggle" type="button" id="dropdownMenu1" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
                    <span class="dropdown-menu-btn">
                        <if condition="($tag eq 0)">
                        全部课程
                        <elseif condition="($tag eq 1)"/>
                        进行中的课程
                        <else/>
                        已结束课程
                        </if>
                    </span>
                    <span class="icon-dropdown"></span>
                  </button>

                  <ul class="dropdown-menu dropdown-menu-list" aria-labelledby="dropdownMenu1">
                    <li class="<if condition="($tag eq 0)">active</if>"><a href="?type=all">全部课程</a></li>
                    <li class="<if condition="($tag eq 1)">active</if>"> <a href="?type=in">进行中的课程</a></li>
                    <li class="<if condition="($tag eq 2)">active</if>"><a href="?type=end">已结束课程</a></li>
                  </ul>
                </div>
            </div>
            <div class="course-list m-main">
                <foreach name="lists" item="list">
                    <ul class="list-group">
                      <li class="list-group-item order-id">
                            <span>课程订单:<em>{$list.order_sn}</em></span>
                            <span class="right">
                                <if condition="($list['order_status'] eq 3) ">  进行中</if>
                                 <if condition="($list['order_status'] eq 4) ">学生申请结束课程</if>
                                <if condition="($list['order_status'] eq 5) ">
                                    课程结束
                                </if>
                            </span>
                      </li>
                      <li class="list-group-item">
                          <span>学生姓名</span>
                          <span class="right">{$list.name}</span>
                      </li>
                        <li class="list-group-item">
                            <span>年级</span>
                            <span class="right" >{$list.grade}</span>
                      </li>

                      <li class="list-group-item">
                            <span>科目</span>
                            <span class="right" >{$list.lesson}</span>
                      </li>

                      <li class="list-group-item">
                            <span>剩余时长</span>
                            <span class="right" >{$list.coursenum}小时</span>
                      </li>
                      <li class="list-group-item">
                            <span>上课登记</span>
                            <span class="right" >
                                <if condition="($list['order_status'] eq 3) AND ($list.coursenum neq 0) ">
                                    <a href="javascript:;" class="add-recorder-btn"data-coursenum="{$list.coursenum}" data-ordersn="{$list.order_sn}">登记</a>
                                <else/>
                                    <span>-</span>
                                </if>
                            </span>
                      </li>
                      <li class="list-group-item">
                            <span>上课记录</span>
                            <span class="right" >
                                <a href="/Home/Order/teacherrecord/id/{$list.order_sn}">查看</a>
                            </span>
                      </li>
                      <li class="list-group-item">
                            <span>详情</span>
                            <span class="right" >
                               <a href="javascript:;" class="detail-btn" data-remarks="{$list.remarks}" data-address="{$list.address}" data-date="{$list.date}" data-toggle="modal" data-target="#detailPanel">查看</a>
                            </span>
                      </li>

                    </ul>
                </foreach>
            </div>
        <else/>
          <div class="row">
              <div class="col-md-12 form-body">
                  <div class="panel panel-default order tab-course">
                      <div class="panel-heading text-center">
                          <h3 class="panel-title">我的订单</h3>
                      </div>
                      <nav>
                          <a href="?type=all" class="btn <if condition="($tag eq 0)">active</if>">全部课程</a>
                          <a href="?type=in" class="btn <if condition="($tag eq 1)">active</if>">进行中的课程</a>
                          <a href="?type=end" class="btn <if condition="($tag eq 2)">active</if>">已结束课程</a>
                      </nav>
                      <div class="table-responsive course-list">
                          <table class="table panel-light">
                              <tr>
                                  <th>订单号</th>
                                  <th>状态</th>
                                  <th>学生姓名</th>
                                  <th>年级</th>
                                  <th>科目</th>
                                  <th>剩余时长</th>
                                  <th>上课登记</th>
                                  <th>上课记录</th>
                                  <th>详情</th>
                              </tr>
                              <foreach name="lists" item="list">
                                  <tr>
                                      <td class="order_sn">{$list.order_sn}</td>
                                      <td>
                                          <if condition="($list['order_status'] eq 3) ">进行中</if>
                                          <if condition="($list['order_status'] eq 4) ">学生申请结束课程</if>
                                          <if condition="($list['order_status'] eq 5) ">
                                          课程结束
                                          </if>
                                      </td>
                                      <td>{$list.name}</td>
                                      <td>{$list.grade}</td>
                                      <td>{$list.lesson}</td>
                                      <td class="coursenum">{$list.coursenum}小时</td>
                                      <td>
                                          <if condition="($list['order_status'] eq 3) AND ($list.coursenum neq 0) ">
                                              <a href="javascript:;" class="add-recorder-btn" data-coursenum="{$list.coursenum}" data-ordersn="{$list.order_sn}">登记</a>
                                          <else/>
                                              <span>-</span>
                                          </if>
                                      </td>
                                      <td>
                                          <a href="/Home/Order/teacherrecord/id/{$list.order_sn}">查看</a>
                                      </td>
                                      <td>
                                          <a href="javascript:;" class="detail-btn" data-remarks="{$list.remarks}" data-address="{$list.address}" data-date="{$list.date}" data-toggle="modal" data-target="#detailPanel">查看</a>

                                      </td>
                                  </tr>
                              </foreach>
                          </table>
                      </div>
                  </div>
              </div>
          </div>
        </if>
    </div>
</div>
<div class="modal fade" id="addRecorder" tabindex="-1" role="dialog" aria-hidden="true">
    <div class="modal-dialog text-center">
        <div class="modal-content">
             <div class="modal-header">
                 <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                     <span aria-hidden="true">×</span>
                 </button>
                 <h4 class="modal-title" id="FastFindModalLabel">请登记本次上课信息</h4>
             </div>
             <div class="modal-body">
                 <div class="login-form" ng-controller="FastOrderCtrl">
                     <div class="form-group clearfix">
                        <label class="control-label left" for="coursenum">消耗课时数</label>
                        <select name="reducenum" id="reduceNum">

                        </select>
                     </div>

                     <div class="form-group clearfix">
                        <label class="control-label left" for="desc">上课时间</label>
                        <select name="eventtime" id="eventTime">

                        </select>
                     </div>

                    <div class="form-group clearfix">
                       <label class="control-label left" for="desc">备注信息</label>
                       <textarea class="form-control login-field  long_remarks" type="text" placeholder="" id="desc" name="remark" rows="3" style="height: 170px;">上次课内容掌握情况:。

辅导的内容为:。

本次作业:。

下次内容预告:。</textarea>
                    </div>
                     <a href="javascript:;" class="btn bg-green white btn-lg btn-block" id="okAddRecorder">确定登记</a>
                 </div>
             </div>
        </div>
    </div>
</div>

<!-- Modal -->
<div class="modal fade" id="detailPanel" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title" id="myModalLabel">学生信息</h4>
      </div>
      <div class="modal-body">
        <table class="table">
            <tr>
                <th>上课时间</th>
                <th>上课地点</th>
                <th>学生备注</th>
            </tr>
            <tr class="detail">
                <td></td>
                <td></td>
                <td></td>
            </tr>
        </table>
      </div>

    </div>
  </div>
</div>
<script type="text/javascript" src="/Public/order/teacherorder/teacherorder.js"></script>
<include file="./Application/Home/View/default/public/footer.html"/>
</body>
</html>
